package extend.part5;


public class Main {
    public static void main(String[] args) {
        Print<Teacher> print = new Print<>();
        Teacher teacher = new Teacher();
        print.print(teacher);
        Student student = new Student();
       //print.print(student);  //确定了Teacher类型
        print.print2(student); //泛型方法，参数可以是任意类型
        print.print2(123);
        print.print2("dfss");
    }
}
